<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %>
<%@ page language="java" pageEncoding="UTF-8"%>

<h2><spring:message code="result.title" arguments="${tm.station.station};${tm.smer}" argumentSeparator=";"/></h2>

<div id="tabs">
	<ul>
		<li><a href="#tabs-1">Klasicky</a></li>
		<li><a href="#tabs-2">RDF Triples</a></li>
	</ul>

	<div id="tabs-1">
	<table id="time-table">
	<tr>
	<th class="hod">Hod.</th><th class="min">Min.</th>
	</tr>
	<c:forEach items="${tm.departs}" varStatus="stat">
		<tr>
		<td class="hod">${stat.current.key}</td>
		<td class="min"> 	
		<c:forEach items="${stat.current.value}" var="st">
			${st.minute}&nbsp;
		</c:forEach>
		</td>
		</tr>
	</c:forEach>
	</table>
	</div>

	<div id="tabs-2">
	<h3>Prefixy:</h3><br/>
	<table id="prefixes">
		<tr><td class="prefix">depart:</td><td>&lt;http://www.swe.cz/depart/&gt;<br/></td></tr>
		<tr><td class="prefix">timetable:</td><td>&lt;http://www.swe.cz/timetable/&gt;<br/></td></tr>
		<tr><td class="prefix">line:</td><td>&lt;http://www.swe.cz/line/&gt;<br/></td></tr>
		<tr><td class="prefix">station:</td><td>&lt;http://www.swe.cz/station/&gt;<br/>	</td></tr>
		<tr><td class="prefix">rdf:</td><td>&lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;<br/></td></tr>
		<tr><td class="prefix">on:</td><td>&lt;http://www.swe.cz/ontology/&gt;<br/></td></tr>
	</table>
	<table id="results-table">
	<tr>
	<th class="subject">subject</th><th class="predicate">predicate</th><th class="object">object</th>
	</tr>
	<tr><td class="subject">${tm.station.uri}</td><td class="predicate">rdf:type</td><td class="object">on:Station</td></tr>
	<tr><td class="subject">${tm.station.uri}</td><td class="predicate">on:name</td><td class="object">${tm.station.station}</td></tr>
	<tr><td class="subject">${tm.line.uri}</td><td class="predicate">rdf:type</td><td class="object">on:Line</td></tr>
	<tr><td class="subject">${tm.line.uri}</td><td class="predicate">on:number</td><td class="object">${tm.line.number}</td></tr>
	<c:forEach items="${tm.departs}" varStatus="stat">
		<c:forEach items="${stat.current.value}" var="st">
			<tr><td class="subject">${st.departUri}</td> <td class="predicate">rdf:type</td><td class="object">on:Depart</td></tr>
			<tr><td class="subject">${st.departUri}</td> <td class="predicate"> on:minute</td> <td class="object">${st.hour}</td></tr>
			<tr><td class="subject">${st.departUri}</td> <td class="predicate">on:minute</td> <td class="object"> ${st.minute}</td></tr>
		</c:forEach>
	</c:forEach>
	</table>
	</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
	$("#tabs").tabs();
});
</script>
